import plugin from '../../lib/plugins/plugin.js'
import cfg from '../../lib/config/config.js'
import common from '../../lib/common/common.js'
import lodash from 'lodash'
import { segment } from "oicq";
let ciku = ['那里....不可以...', '气死我了，好想打你一顿', '这里有个坏蛋就知道欺负我！！', '不可以，不可以，不可以！那里不可以！都给我戳疼了！！', 'ヽ(`Д´)ﾉ再戳我就生气咯', '啊...温柔一点...把我戳疼辣..', '要戳坏掉了！', '你欺负人，呜呜', '你干嘛欺负阿咩啊！！你怎么不戳寄几哦๐·°(৹˃̵﹏˂̵৹)°·๐', '₍₍ (̨̡ ‾᷄ᗣ‾᷅ )̧̢ ₎₎阿咩睡觉呢你戳我干嘛啊！！', '你轻一点哦~', '我怕疼...轻一点~', '再戳就坏了！！！', '请...请...不要戳那里...', '要轻一点戳哦~', '你戳谁呢！戳谁呢！！！哼！有点不想理你了（˃̣̣̥᷄⌓˂̣̣̥᷅）', '有一点不想理你了（˃̣̣̥᷄⌓˂̣̣̥᷅）']
let CD = false
export class poke extends plugin {
  constructor() {
    super({
      name: '戳一戳',
      dsc: '简单开发示例',
      /** https://oicqjs.github.io/oicq/#events */
      event: 'notice.group.poke',
      priority: 70,
    })
  }

  async accept(e) {
    if (CD) {
      return true
    } else {
      CD = true
      setTimeout(function () {
        CD = false
      }, 3000)
      if (e.target_id === e.self_id) {
        let num = Math.ceil(Math.random() * (ciku.length + 24))
        if (num === 1) {
          await e.group.pokeMember(e.operator_id)
          this.reply('戳回去！！')
        } else if (num === 2) {
          this.reply('说了不要戳了！')
          await e.group.muteMember(e.operator_id, 60)
        } else if (num === 3) {
          this.reply('不！！')
          await common.sleep(500)
          this.reply('准！！')
          await common.sleep(500)
          this.reply('戳！！')
        } else if (num === 4) {
          await e.group.pokeMember(e.operator_id)
          this.reply('你刚刚是不是戳我了，你是坏蛋！我要戳回去，哼！！！')
        }else if (num === 5) {
          await e.group.pokeMember(e.operator_id)
          this.reply('你戳我是不是(⁎•̛̣̣꒶̯•̛̣̣⁎)？我要回手！回手！！戳！我戳！！要戳回去！戳回去！！！')
        }else if (num === 6) {
          e.reply(`这就是新的生活之道吧…我明白了，我不会抱怨的。`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/0/01/t7lyzd4gsna8erk7yt5tn33yu3wy8m2.mp3")
          e.reply(msg)
        }else if(num === 7) {
          e.reply(`如果…可以用和平的方式解决。不，没什么…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/d/d6/kpn6l4vcrlrehbp6cpmqqe309kwpvym.mp3")
          e.reply(msg)
        }else if(num ===  8) {
          e.reply(`爱好吗，爱好的话…工作吧。嗯？工作不能算？但是，为什么呢？难道爱好不是指自己想要去做，做了就会感到开心的事情吗。那么爱好是工作，又有什么问题呢？`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/a/ac/oa8bles86ml9j6u0t5s8y5n3fi8ty9k.mp3")
          e.reply(msg)
        }else if(num ===  9) {
          e.reply(`我思考过了…既然是「工作」，处理「工作」就没有害羞的必要。如果你想要了解我的话，这个头上的…发饰。其实是我的角。我的身上，有着仙兽「麒麟」的血脉。唔…理解了的话，请签下这份保密协议，不要对别人讲…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/6/68/ps22nhruh62jyqg4fzn88xvsjegnm83.mp3")
          e.reply(msg)
        }else if(num ===  10) {
          e.reply(`想要了解更多甘雨的事情…这，这是什么工作要求啊。我，我还从来没有处理过这样的…去年年底述职报告的背诵可以吗？啊，不行啊`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/4/48/ge310ddpt2n60dmol24d2gqz8t945yv.mp3")
          e.reply(msg)
        }else if(num ===  11) {
          e.reply(`临时的工作吗？啊，不用和我具体说。将你的要求写下来，放在这边就好`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/b/ba/k5b66upq8t46l6gs5tzwr1gu37kto5a.mp3")
          e.reply(msg)
        }else if(num ===  12) {
          e.reply(`清心的花瓣，很好吃…应该说特别好吃。就是因为太好吃了，所以我才不敢在玉京台种它。生怕哪天一个不小心就会忍不住…嗯？你说…特别苦？可是…这不就是它的味道吗？`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/0/07/fisuak367tlcly45f1sd5h2byvo98td.mp3")
          e.reply(msg)
        }else if(num ===  13) {
          e.reply(`生活在璃月的每一只小狗，我都给它们取了名字。不过，有的狗狗如果用别的名字叫它也会有反应。真是了不起呢。如果有谁突然叫我「苦雪」什么的，我一定回应不上来。`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/5/53/gtrj55hr7pmue1ttjwf1hzepyzbi6vb.mp3")
          e.reply(msg)
        }else if(num ===  14) {
          e.reply(`嗯…我，我一直想知道你对我工作的评价。是…普通宝箱的等级还是华丽宝箱的等级。没，没关系的。我的心理…能承受的住`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/f/fc/86v7u2x96rj6rl56j6mduxdljp1y2n2.mp3")
          e.reply(msg)
        }else if(num ===  15) {
          e.reply(`今天的工作已经提前完成了。加…加班？我理解了，我会好好完成的`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/1/11/9ycue23jqad38rhupt83cw8h7om73gs.mp3")
          e.reply(msg)
        }else if(num ===  16) {
          e.reply(`嗯？天晴了吗？是什么时候…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/5/5c/rg5zm2tqlfij6jxp8pxyoym7rdy6fje.mp3")
          e.reply(msg)
        }else if(num ===  17) {
          e.reply(`我明白了，外派工作的「契约」已经拟好了，请过目，即日起就可以为你…欸！名字没有签吗？请让我看一下。唔…名字是甘，甘雨…呼，补上了。话，话说回来，工作具体是指哪些呢？`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/6/67/8afe4wh6lkcmpoylg9f4njk1c2jt46t.mp3")
          e.reply(msg)
        }else if(num ===  18) {
          e.reply(`这项工作，该划掉了。`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/4/4f/3swq2zjz5h16s9j8sczh0por4r0861x.mp3")
          e.reply(msg)
        }else if(num ===  19) {
          e.reply(`…是我久疏战场。`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/b/bb/i39c5rp38dxagbkwvedhrxe6rqrngnn.mp3")
          e.reply(msg)
        }else if(num ===  20) {
          e.reply(`需要…补充能量。`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/b/b5/peh84uvvv6nx6kkvj2tfr0p7bxhfxlu.mp3")
          e.reply(msg)
        }else if(num ===  21) {
          e.reply(`运动，是必要的…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/6/6c/bxsn2rl31btnojjz5kqhymngfhn7a97.mp3")
          e.reply(msg)
        }else if(num ===  22) {
          e.reply(`工作时间到了么`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/5/51/s6zvqa3hioxpkup982pjdcle587trb1.mp3")
          e.reply(msg)
        }else if(num ===  23) {
          e.reply(`没有关系…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/4/4f/dr19jdist9qf08wx6llxg8cgj3nwt83.mp3")
          e.reply(msg)
        }else if(num ===  24) {
          e.reply(`我得…再撑一会…`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/b/b2/th3mnm89tmvg49rxagtvgetq68hc6f9.mp3")
          e.reply(msg)
        }else if(num ===  25) {
          e.reply(`呃…「不可贸然进攻」！`);
          let msg = await segment.record("https://patchwiki.biligame.com/images/ys/1/1d/mvvvxvujh8cos3his8o50kzwhvjtcox.mp3")
          e.reply(msg)
        } else if(num ===  26) {
          await e.group.pokeMember(e.operator_id)
          this.reply('戳戳你这个小坏蛋～～～')
        }else {
          this.reply(lodash.sample(ciku))
        }
        return true
      }
    }
  }
}
